package com.example.service.impl;

import com.example.mapper.UserMapper;
import com.example.entity.SecKillUser;
import com.example.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * (SecKillUser)表服务实现类
 *
 * @author 游家纨绔
 * @since 2023-09-05 22:50:00
 */
@Service("userService")
public class UserServiceImpl implements UserService {

	@Resource
	private UserMapper userMapper;

	@Override
	public SecKillUser selectByUserName(String name) {
		return userMapper.selectOne(SecKillUser.builder().username(name).build());
	}

	@Override
	public SecKillUser selectByUserId(Integer userId) {
		return userMapper.selectByPrimaryKey(userId);
	}

}
